/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.fd.manager.impl;

import java.util.Collection;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xy.biz.fd.domain.bo.DocumentLogBO;
import com.xy.biz.fd.domain.query.DocumentLogQuery;
import com.xy.biz.fd.domain.converter.DocumentLogConverter;
import com.xy.biz.fd.manager.DocumentLogManager;
import com.xy.biz.fd.dao.DocumentLogDao;

/**
 * 
 * 
 * @author zgy
 * @date 2021-5-20
 */
@Service
public class DocumentLogManagerImpl implements DocumentLogManager {

	@Autowired
	private DocumentLogDao documentLogDao;
	
	@Override
	public int saveDocumentLog(DocumentLogBO documentLogBO) {
		return documentLogDao.saveDocumentLog(DocumentLogConverter.toPO(documentLogBO));
	}
	
	@Override
	public int saveAllDocumentLog(Collection<DocumentLogBO> collection) {
		return documentLogDao.saveAllDocumentLog(DocumentLogConverter.toPO(collection));
	}
	
	@Override
	public int updateDocumentLog(DocumentLogBO documentLogBO) {
		return documentLogDao.updateDocumentLog(DocumentLogConverter.toPO(documentLogBO));
	}
	
	@Override
	public int deleteDocumentLog(Long documentLogId) {
		return documentLogDao.deleteDocumentLog(documentLogId);
	}
	
	@Override
	public DocumentLogBO getDocumentLog(Long documentLogId) {
		return DocumentLogConverter.fromPO(documentLogDao.getDocumentLog(documentLogId));
	}
	
	@Override
	public List<DocumentLogBO> listDocumentLogById(Collection<Long> collection) {
		return DocumentLogConverter.fromPO(documentLogDao.listDocumentLogById(collection));
	}
	
	@Override
	public List<DocumentLogBO> listDocumentLog(DocumentLogQuery query) {
		return DocumentLogConverter.fromPO(documentLogDao.listDocumentLog(query));
	}
	
	@Override
	public int countDocumentLog(DocumentLogQuery query) {
		return documentLogDao.countDocumentLog(query);
	}
	
}
